home *** CD-ROM | disk | FTP | other *** search
- /*
- IC Component API.h
-
- Defines the call interface to the IC component.
-
- I (dhn) modified this to appear as a component interface file (IMHO) should
- look like.
-
- I took out the XXXWORDINLINE code, replaced the numerical selector values
- with their enumerated constant values, etc.
-
- By using the ComponentCallNow macro we ensure that the correct expansion
- will take place when compiling 68k or PPC code. For 68k code, the asm code
- to call the component will expand in place and work correctly. For PPC code,
- the macro will expand to nothing leaving a prototype for the glue functions.
-
- By using the enumerated values in ICComponentSelectors.h, if the enums change
- then the code will compile to the correct selector routine; it won't be necessary
- to go into this file to change the selector codes.
-
- History:
- 11/03/95 - dhn - Modified and renamed to "IC Component API.h"
- */
-
- /*
- Original header information follows:
-
- * File: ICCAPI.h
- * Generated by: 1.0d4
- * For: IC 1.2
- * On: Monday, 25 September 1995, 19:28:12
- *
- * This file is part of the Internet Configuration system and
- * is placed in the public domain for the benefit of all.
- */
-
- #ifndef __H_IC_Component_API__
- #define __H_IC_Component_API__
-
- #include <Components.h>
-
- #include "IC Types.h"
- #include "IC Keys.h"
-
- #include "IC Component Selectors.h"
-
- #if 0
- // routine descriptions
- #include "IC Component API Descriptions.h"
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* ***** Starting Up and Shutting Down ***** */
-
- pascal ICError ICCStart(internetConfigurationComponent* inst,OSType creator);
- pascal ICError ICCStop(internetConfigurationComponent inst);
-
- pascal ICError ICCStartComponent(internetConfigurationComponent inst,OSType creator) \
- ComponentCallNow(kICCStart,4);
- pascal ICError ICCStopComponent(internetConfigurationComponent inst) \
- ComponentCallNow(kICCStop,0);
-
- pascal ICError ICCGetComponentInstance(internetConfigurationComponent inst,Ptr* component_inst);
-
- /* ***** Specifying a Configuration ***** */
-
- pascal ICError ICCFindConfigFile(internetConfigurationComponent inst,short count,ICDirSpecArrayPtr folders) \
- ComponentCallNow(kICCFindConfigFile,6);
- pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst,ICDirSpec* where) \
- ComponentCallNow(kICCFindUserConfigFile,4);
- pascal ICError ICCGeneralFindConfigFile(internetConfigurationComponent inst,Boolean search_prefs,Boolean can_create,short count,ICDirSpecArrayPtr folders) \
- ComponentCallNow(kICCGeneralFindConfigFile,10);
- pascal ICError ICCChooseConfig(internetConfigurationComponent inst) \
- ComponentCallNow(kICCChooseConfig,0);
- pascal ICError ICCChooseNewConfig(internetConfigurationComponent inst) \
- ComponentCallNow(kICCChooseNewConfig,0);
- pascal ICError ICCGetConfigName(internetConfigurationComponent inst,Boolean longname,StringPtr name) \
- ComponentCallNow(kICCGetConfigName,6);
- pascal ICError ICCGetConfigReference(internetConfigurationComponent inst,ICConfigRefHandle ref) \
- ComponentCallNow(kICCGetConfigReference,4);
- pascal ICError ICCSetConfigReference(internetConfigurationComponent inst,ICConfigRefHandle ref,long flags) \
- ComponentCallNow(kICCSetConfigReference,8);
- pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst,FSSpec* config) \
- ComponentCallNow(kICCSpecifyConfigFile,4);
-
- /* ***** Getting Information ***** */
-
- pascal ICError ICCGetSeed(internetConfigurationComponent inst,long* seed) \
- ComponentCallNow(kICCGetSeed,4);
- pascal ICError ICCGetPerm(internetConfigurationComponent inst,ICPerm* perm) \
- ComponentCallNow(kICCGetPerm,4);
- pascal ICError ICCDefaultFileName(internetConfigurationComponent inst,StringPtr name) \
- ComponentCallNow(kICCDefaultFileName,4);
-
- /* ***** Reading and Writing Preferences ***** */
-
- pascal ICError ICCBegin(internetConfigurationComponent inst,ICPerm perm) \
- ComponentCallNow(kICCBegin,2);
- pascal ICError ICCGetPref(internetConfigurationComponent inst,StringPtr key,ICAttr* attr,Ptr buf,long* size) \
- ComponentCallNow(kICCGetPref,16);
- pascal ICError ICCSetPref(internetConfigurationComponent inst,StringPtr key,ICAttr attr,Ptr buf,long size) \
- ComponentCallNow(kICCSetPref,16);
- pascal ICError ICCFindPrefHandle(internetConfigurationComponent inst,StringPtr key,ICAttr* attr,Handle prefh) \
- ComponentCallNow(kICCFindPrefHandle,12);
- pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst,StringPtr key,ICAttr* attr,Handle* prefh) \
- ComponentCallNow(kICCGetPrefHandle,12);
- pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst,StringPtr key,ICAttr attr,Handle prefh) \
- ComponentCallNow(kICCSetPrefHandle,12);
- pascal ICError ICCCountPref(internetConfigurationComponent inst,long* count) \
- ComponentCallNow(kICCCountPref,4);
- pascal ICError ICCGetIndPref(internetConfigurationComponent inst,long n,StringPtr key) \
- ComponentCallNow(kICCGetIndPref,8);
- pascal ICError ICCDeletePref(internetConfigurationComponent inst,StringPtr key) \
- ComponentCallNow(kICCDeletePref,4);
- pascal ICError ICCEnd(internetConfigurationComponent inst) \
- ComponentCallNow(kICCEnd,0);
- pascal ICError ICCEditPreferences(internetConfigurationComponent inst,StringPtr key) \
- ComponentCallNow(kICCEditPreferences,4);
-
- /* ***** URL Handling ***** */
-
- pascal ICError ICCParseURL(internetConfigurationComponent inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd,Handle url) \
- ComponentCallNow(kICCParseURL,24);
- pascal ICError ICCLaunchURL(internetConfigurationComponent inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd) \
- ComponentCallNow(kICCLaunchURL,20);
-
- /*
- ***** Mappings Routines *****
-
- Routines for interrogating mappings database.
-
- ----- High Level Routines -----
- */
-
- pascal ICError ICCMapFilename(internetConfigurationComponent inst,StringPtr filename,ICMapEntry* entry) \
- ComponentCallNow(kICCMapFilename,8);
- pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry) \
- ComponentCallNow(kICCMapTypeCreator,16);
-
- /* ----- Mid Level Routines ----- */
-
- pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst,Handle entries,StringPtr filename,ICMapEntry* entry) \
- ComponentCallNow(kICCMapEntriesFilename,12);
- pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst,Handle entries,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry) \
- ComponentCallNow(kICCMapEntriesTypeCreator,20);
-
- /* ----- Low Level Routines ----- */
-
- pascal ICError ICCCountMapEntries(internetConfigurationComponent inst,Handle entries,long* count) \
- ComponentCallNow(kICCCountMapEntries,8);
- pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst,Handle entries,long ndx,long* pos,ICMapEntry* entry) \
- ComponentCallNow(kICCGetIndMapEntry,16);
- pascal ICError ICCGetMapEntry(internetConfigurationComponent inst,Handle entries,long pos,ICMapEntry* entry) \
- ComponentCallNow(kICCGetMapEntry,12);
- pascal ICError ICCSetMapEntry(internetConfigurationComponent inst,Handle entries,long pos,ICMapEntry* entry) \
- ComponentCallNow(kICCSetMapEntry,12);
- pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst,Handle entries,long pos) \
- ComponentCallNow(kICCDeleteMapEntry,8);
- pascal ICError ICCAddMapEntry(internetConfigurationComponent inst,Handle entries,ICMapEntry* entry) \
- ComponentCallNow(kICCAddMapEntry,8);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __H_IC_Component_API__ */
-
-
-
-
-
-
-
-
-